package com.xtoneict.auth.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.HashSet;
import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author hx
 * @since 2024-05-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "user_id", type = IdType.AUTO)
    private Integer userId;

    private String name;

    private String username;

    private String password;

    private Integer depId;

    @TableField(exist = false)
    private HashSet<Role> roles;

    @TableField(exist = false)
    private HashSet<Permission> permissions;

    @TableField(exist = false)
    private HashSet<WorkTimeFile> files;

    @TableLogic
    @TableField(value = "is_deleted",fill = FieldFill.INSERT)
    private Integer isDeleted;

}
